<script setup>
  import { ref, reactive } from 'vue';
  import Sun from './components/Sun.vue';

  let message = ref('张三');
  let person = reactive({
    age: 12,
    score: 88
  });

  let fun = function() {
    person.score++;
  }
</script>

<template>
  <div>
    父组件中的分数：{{ person.score }}
    <Sun v-bind:message="message" :score="person.score"></Sun><br>
    <input :type="'button'" :value="'分数加一'" @click="fun()" />

  </div>
</template>

<style scoped>
</style>
